def arrs=[];
char c='A'
arrs<<c;
for(int i=1;i<26;i++){ c+=1; arrs<<c; }
c='a';
arrs<<c;
for(int i=1;i<26;i++){ c+=1; arrs<<c; }
c='0';
arrs<<c;
for(int i=0;i<9;i++){ c+=1; arrs<<c; }

def fileName="";
for(int i=0;i<10;i++){
    def idx = new Random().nextInt(arrs.size())
    fileName+=arrs[idx];
}

//新建一个文件，并写入字符串
new File(fileName).withWriter ("utf-8"){writer->
    writer.writeLine "Hey Shit";
    writer.writeLine "Hey Shit";
    writer.writeLine "Hey Shit";
}

